<?php
namespace Home\Controller;
use Think\Controller;
class IndexController extends Controller {
    public function index(){
    	$this->isSession();
        $this->display();
    }
    public function isSession(){
        $user_manage = array(
                'status'  => 0,//0未登录，1登录；
                'value1'  => '注册',
                'value2'  => '登录',
                'url1'    => U('User/register'),
                'url2'    => U('User/login'),               
            );
        if(session('?username')){
            $user_manage = array(
                'status'  => 1,//0未登录，1登录；
                'value1'  => session("username"),
                'value2'  => '退出',
                'url1'    => U('User/userManage'),
                'url2'    => U('User/userExit'),                
            );
        }
        $this->assign('user_manage',$user_manage);
    }
    
}